/*
 * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#pragma once

#ifndef _MY_KEY_DRIVER_H
#define _MY_KEY_DRIVER_H

#include "sdkconfig.h"
#include "driver/gpio.h"
#include "my_system_param.h"


typedef enum {
    BUTTON_ACTIVE_HIGH = 1,    /*!<button active level: high level*/
    BUTTON_ACTIVE_LOW = 0,     /*!<button active level: low level*/
} button_active_t;

/**
 * @brief The state when the button is triggered
 */

/**
 * @brief  Button initialize
 *
 * @return
 *      - MDF_OK
 *      - MDF_ERR_INVALID_ARG
 */
esp_err_t button_driver_init();

/**
 * @brief  Button deinitialize
 *
 * @return
 *      - MDF_OK
 *      - MDF_ERR_INVALID_ARG
 */
esp_err_t button_driver_deinit();
/**
 *@brief Get the status record of the key
 *
 * @param  key_num Key sequence number
 * @return Key status
 */
key_event_t button_key_get_status(uint8_t key_num);


/**
 * @brief Reset key status record
 */
void button_key_reset_status();


#endif



